package com.soup.lab.mybatis;

import com.soup.lab.mybatis.service.CompanyService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan(basePackages = "com.soup.lab.mybatis.dao")
public class MainApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MainApplication.class, args);
        CompanyService companyService = context.getBean(CompanyService.class);
        companyService.establish();
    }

}
